Skip to content

Setu 0.1.6: strip terminal escapes from site logs - #23

Closed
techgopal wants to merge 1 commit into
mainfrom
log-ansi
Closed

techgopal wants to merge 1 commit into
mainfrom
log-ansi

Conversation

@techgopal

Copy link
Copy Markdown
Contributor

The Logs tab showed raw ESC[2m…ESC[0m sequences for apps that colour their output under systemd (Vyasa did, until 0.3.4).

journal::strip_ansi drops CSI, OSC (BEL or ST terminated) and two-byte escapes from each MESSAGE, for both the string and the byte-array forms journald emits. Tests: colour_codes_are_stripped_from_messages, strip_ansi_keeps_plain_text_and_drops_osc_titles.

Gates: fmt, clippy -D warnings clean; scripts/test.sh passes except agent_protocol, which fails identically on main locally (PoolTimedOut connecting to the test Postgres, an environment issue, unrelated to this change).

The agent removes CSI, OSC and two-byte escape sequences from each
journal MESSAGE, so apps that colour their logs under systemd show
plain text in the Logs tab.
@techgopal

Copy link
Copy Markdown
Contributor Author

Included in #22 (Setu 0.1.6), which carried this commit unchanged.

@techgopal techgopal closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant